package cn.stylefeng.guns.modular.cb.mapper;

import cn.stylefeng.guns.modular.cb.entity.CbCustomerCompany;
import cn.stylefeng.guns.modular.cb.model.params.CbCustomerCompanyParam;
import cn.stylefeng.guns.modular.cb.model.result.CbCustomerCompanyResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wj
 * @since 2021-01-07
 */
public interface CbCustomerCompanyMapper extends BaseMapper<CbCustomerCompany> {

    /**
     * 获取列表
     *
     * @author wj
     * @Date 2021-01-07
     */
    List<CbCustomerCompanyResult> customList(@Param("paramCondition") CbCustomerCompanyParam paramCondition);

    /**
     * 获取map列表
     *
     * @author wj
     * @Date 2021-01-07
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") CbCustomerCompanyParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author wj
     * @Date 2021-01-07
     */
    Page<CbCustomerCompanyResult> customPageList(@Param("page") Page page, @Param("paramCondition") CbCustomerCompanyParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author wj
     * @Date 2021-01-07
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") CbCustomerCompanyParam paramCondition);

    /**
     * 获取用户企业
     * @param paramCondition
     * @return
     */
    CbCustomerCompanyResult getCompany(@Param("paramCondition") CbCustomerCompanyParam paramCondition);

    /**
     * 企业数量统计
     * @param startDate
     * @return
     */
    List<Map<String,Object>> queryDateCount(@Param("startDate")String startDate, @Param("countArr")String[] countArr);

    /**
     * 修改用户状态
     */
    int setUserStatus(@Param("userId") Long userId, @Param("status") String status);

    /**
     * 查询分享人，及分享数量
     * @return
     */
    Page<CbCustomerCompanyResult> referessList(@Param("page") Page page, CbCustomerCompanyParam param);
}
